package cn.tedu.shoot;
import java.awt.image.BufferedImage;
public class Airplane extends FlyingObject implements Enemy,EnemyBullets{
	
	private int speed;//移动速度
	public Airplane(){
		super(48,50);
		speed = 2;
	}
	public void step() {
		y+=speed;
	}
	int index = 1;
   public BufferedImage getImage() {
	   if(isLife()) {
			return Images.airplanes[0];
		}else if(isDead()) {
			BufferedImage img =  Images.airplanes[index++];
			if(index==Images.airplanes.length) {
			state = REMOVE;
			}
			return img;
		}
		return null;
	}
   /**重写getScore()得分*/
   public int getScore() {
	   return 1;
   }
}
